package cn.com.hhrcw.message;

import cn.com.hhrcw.message.entity.DepartResult;
import cn.com.hhrcw.message.entity.UserResult;
import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.DataVariable;
import com.dtflys.forest.annotation.Get;

import java.util.List;

/**
 * http消息发送服务
 *
 * @author lixingxing
 */
@BaseRequest(baseURL = "${host}", interceptor = MessageInterceptor.class)
public interface MechanismService {

    /**
     * getDepartResult
     *
     * @return
     */
    @Get(url = "/uop/v1/orgs", contentType = "application/json;charset=utf-8", dataType = "json")
    List<DepartResult> getDepartResult();

    /**
     * getUserResult
     *
     * @param id
     * @return
     */
    @Get(url = "/uop/v1/orgs/${id}/users", contentType = "application/json;charset=utf-8", dataType = "json")
    List<UserResult> getUserResult(@DataVariable("id") String id);

    /**
     * getAddDepart
     *
     * @param id
     * @return
     */
    @Get(url = "/uop/v1/orgs/${id}/children", contentType = "application/json", dataType = "json")
    DepartResult getAddDepart(@DataVariable("id") String id);

    /**
     * getAddUser
     *
     * @param id
     * @return
     */
    @Get(url = "/uop/v1/orgs/${id}/users", contentType = "application/json", dataType = "json")
    UserResult getAddUser(@DataVariable("id") String id);
}
